<template>
	<view class="con">
		<!-- 页面标题 start -->
		<cu-custom bgColor="bg-gradual-blue" :isBack="true">
			<block slot="content">公告详情</block>
		</cu-custom>
		<!-- 页面标题 end -->
		<scroll-view :scroll-y="true" class="detail-con col-warpper">
			<view class="header-con">
				<view class="col-warpper title">
					{{info.title}}
				</view>
				<view class="col-warpper publish-time">
					发布时间: {{info.dtime}}
				</view>
			</view>
			<view v-html="info.body"></view>
		</scroll-view>
	</view>
</template>

<script>
	import newMixin from "@/common/request/newMixin.js"
	export default {
		mixins: [newMixin],
		created() {
			this.initData()
		},
		data() {
			return {
				body: "",
				info: {
					body: "",
					title: ""
				}
			}
		},
		methods: {
			/**
			 * 加载数据
			 */
			initData() {
				const pd = {
					id: this.$route.query.id
				}
				this.queryById(pd, data => {
					this.info = data
				})
			}
		}
	}
</script>

<style lang="less">
	.detail-con {
		padding: 5px 25px;

		.header-con {
			border-bottom: 1px solid #CCCCCC;
			padding: 10px;
			margin-bottom: 15px;

			.title {
				font-size: 18px;
				font-weight: 700;
				line-height: 30px;
			}

			.publish-time {
				color: #CCCCCC;
				font-size: 16px;
			}
		}
	}
</style>
